/*
 * =====================================================================================
 *
 *       Filename:  my_netio.h
 *
 *    Description:  my net io head file
 *
 *        Version:  1.0
 *        Created:  2017年03月27日 23时17分25秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  yangkun (yk)
 *          Email:  xyyangkun@163.com
 *        Company:  yangkun.com
 *
 * =====================================================================================
 */
#ifndef _MY_NETIO_H_
#define _MY_NETIO_H_
int check_socket_connected(int sockfd);
int my_create_tcp_server(char *ip, short port);
int my_create_tcp_client(char *srvip, short srvport);
int my_write(int fd, char *buf, unsigned int size);
int my_read(int fd, char *buf, unsigned int size);
int my_accept(int listenfd, struct sockaddr_in *cliaddr, socklen_t *cliaddr_len);
ssize_t Readn(int fd, const void *vptr, size_t n);
ssize_t Writen(int fd, const void *vptr, size_t n);
#endif//_MY_NETIO_H_
